Optimal. Leaf size=71 \[ \frac{c^3 \tan (e+f x)}{a f}+\frac{4 i c^3}{f (a+i a \tan (e+f x))}-\frac{4 i c^3 \log (\cos (e+f x))}{a f}-\frac{4 c^3 x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.121027, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac{c^3 \tan (e+f x)}{a f}+\frac{4 i c^3}{f (a+i a \tan (e+f x))}-\frac{4 i c^3 \log (\cos (e+f x))}{a f}-\frac{4 c^3 x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3522
Rule 3487
Rule 43
Rubi steps
\begin{align*} \int \frac{(c-i c \tan (e+f x))^3}{a+i a \tan (e+f x)} \, dx &=\left (a^3 c^3\right ) \int \frac{\sec ^6(e+f x)}{(a+i a \tan (e+f x))^4} \, dx\\ &=-\frac{\left (i c^3\right ) \operatorname{Subst}\left (\int \frac{(a-x)^2}{(a+x)^2} \, dx,x,i a \tan (e+f x)\right )}{a^2 f}\\ &=-\frac{\left (i c^3\right ) \operatorname{Subst}\left (\int \left (1+\frac{4 a^2}{(a+x)^2}-\frac{4 a}{a+x}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^2 f}\\ &=-\frac{4 c^3 x}{a}-\frac{4 i c^3 \log (\cos (e+f x))}{a f}+\frac{c^3 \tan (e+f x)}{a f}+\frac{4 i c^3}{f (a+i a \tan (e+f x))}\\ \end{align*}
Mathematica [B] time = 1.76348, size = 234, normalized size = 3.3 \[ \frac{i c^3 \sec ^2(e+f x) \left (-2 \sin (e+2 f x)-\sin (3 e+2 f x)-i \cos (3 e+2 f x)+i \cos (3 e+2 f x) \log \left (\cos ^2(e+f x)\right )+i \cos (e+2 f x) \log \left (\cos ^2(e+f x)\right )+i \cos (e) \left (2 \log \left (\cos ^2(e+f x)\right )-3\right )-\sin (e+2 f x) \log \left (\cos ^2(e+f x)\right )-\sin (3 e+2 f x) \log \left (\cos ^2(e+f x)\right )+8 \cos (e) \tan ^{-1}(\tan (f x)) \cos (e+f x) (\cos (e+f x)+i \sin (e+f x))+\sin (e)\right )}{2 a f \left (\cos \left (\frac{e}{2}\right )-\sin \left (\frac{e}{2}\right )\right ) \left (\sin \left (\frac{e}{2}\right )+\cos \left (\frac{e}{2}\right )\right ) (\tan (e+f x)-i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.024, size = 62, normalized size = 0.9 \begin{align*}{\frac{{c}^{3}\tan \left ( fx+e \right ) }{af}}+{\frac{4\,i{c}^{3}\ln \left ( \tan \left ( fx+e \right ) -i \right ) }{af}}+4\,{\frac{{c}^{3}}{af \left ( \tan \left ( fx+e \right ) -i \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.34351, size = 313, normalized size = 4.41 \begin{align*} -\frac{8 \, c^{3} f x e^{\left (4 i \, f x + 4 i \, e\right )} - 2 i \, c^{3} +{\left (8 \, c^{3} f x - 4 i \, c^{3}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} -{\left (-4 i \, c^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 4 i \, c^{3} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{a f e^{\left (4 i \, f x + 4 i \, e\right )} + a f e^{\left (2 i \, f x + 2 i \, e\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 3.16319, size = 119, normalized size = 1.68 \begin{align*} - \frac{4 i c^{3} \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a f} + \frac{2 i c^{3} e^{- 2 i e}}{a f \left (e^{2 i f x} + e^{- 2 i e}\right )} - \frac{\left (\begin{cases} 8 c^{3} x e^{2 i e} - \frac{2 i c^{3} e^{- 2 i f x}}{f} & \text{for}\: f \neq 0 \\x \left (8 c^{3} e^{2 i e} - 4 c^{3}\right ) & \text{otherwise} \end{cases}\right ) e^{- 2 i e}}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.49415, size = 250, normalized size = 3.52 \begin{align*} \frac{2 \,{\left (\frac{4 i \, c^{3} \log \left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}{a} - \frac{2 i \, c^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac{2 i \, c^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{a} + \frac{2 i \, c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 2 i \, c^{3}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 1\right )} a} + \frac{-6 i \, c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 16 \, c^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 6 i \, c^{3}}{a{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - i\right )}^{2}}\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]